package com.xinqi.modules.databank.dto.rsp.question;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.xinqi.common.base.dto.CommonFileDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 题目内容DTO,大家都用这个，如果有改动的地方，大家只需要改一个地方就行了
 * @author linkai
 * @date 2023/3/26
 */
@Data
@Schema(description = "试题基础信息DTO")
public class QuestionAnalysisResultDTO implements Serializable {

    /**
     * 题目唯一标记
     */
    @JsonProperty("id")
    @Schema(description = "题目唯一标记", example = "1")
    private Long id;

    @Schema(description = "资料库ID", example = "12312312312312")
    private Long contentId;

    @Schema(description = "互动环节ID", example = "12312312312312")
    private Long partId;
    /**
     * 题型，1:判断题；2:单选题；3:多选题；4:不定项题；5: 填空题；6:简答题；
     */
    @JsonProperty("type")
    @Schema(description = "题型，1:判断题；2:单选题；3:多选题；4:不定项题；5: 填空题；6:简答题；", example = "1")
    private String type;
    /**
     * 标题
     */
    @Schema(description = "标题", example = "")
    @Size(min = 0, max = 3000, message = "题目字数不能大于3000")
    private String question;
    /**
     * 内容
     */
    @Schema(description = "内容", example = "")
    @Size(min = 0, max = 3000, message = "内容字数不能大于3000")
    private String content;

    /** 题干文件 */
    private String questionFile;
    /**
     * 题目文件
     */
    @Schema(description = "内容文件列表", example = "")
    private List<CommonFileDTO> questionFiles;

    /** 选项设置 */
    private String options;
    /**
     * 选项设置
     */
    @Schema(description = "选项设置", example = "")
    private List<QuestionOptionsAnalysisDTO> optionList;
    /**
     * 难易程度，1:易；2:中；3:难
     */
    @Schema(description = "难易程度，1:易；2:中；3:难", example = "")
    private String difficulty;
    /**
     * 分值
     */
    @Schema(description = "分值", example = "")
    private BigDecimal score;
    /**
     * 题目排序
     */
    @Schema(description = "题目排序", example = "")
    private Integer sort;

    /**
     * 答案
     */
    @Schema(description = "是否作答", example = "")
    private Integer isReply;

    /**
     * 答案
     */
    @Schema(description = "答案", example = "")
    @Size(min = 0, max = 1000, message = "答案字数不能大于1000")
    private String answer;
    /**
     * 答案文件
     */
    @Schema(description = "答案文件", example = "")
    private String answerFile;
    /**
     * 答案文件
     */
    @Schema(description = "答案文件列表", example = "")
    private List<CommonFileDTO> answerFiles;

    /**
     * 答案解析
     */
    @Schema(description = "答案解析", example = "")
    @Size(min = 0, max = 1000, message = "答案解析字数不能大于1000")
    private String analysis;
    /**
     * 答案解析
     */
    @Schema(description = "答案解析文件", example = "")
    private String analysisFile;
    /**
     * 答案解析文件
     */
    @Schema(description = "答案解析文件列表", example = "")
    private List<CommonFileDTO> analysisFiles;

    /**
     * 参与答题总人数
     */
    @Schema(description = "参与答题总人数", example = "10")
    private Integer allNumber;

    /**
     * 答对总人数
     */
    @Schema(description = "答对总人数", example = "5")
    private Integer rightNumber;

    /**
     * 得分率
     */
    @Schema(description = "试题得分率", example = "")
    private BigDecimal scoreRate;


}
